<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta http-equiv="X-UA-Compatible" content="ie=edge">
		<title>立方体(第三版)</title>
		<style type="text/css">
			* {
				margin: 0;
				padding: 0;
			}

			#wrap {
				position: absolute;
				top: 0;
				left: 0;
				bottom: 0;
				right: 0;
				margin: auto;
				width: 300px;
				height: 300px;
				border: 2px solid;
				background-size: 100% 100%;
				perspective: 200px;
			}

			#wrap>.box {
				position: absolute;
				top: 0;
				left: 0;
				bottom: 0;
				right: 0;
				margin: auto;
				width: 100px;
				height: 100px;

				transform-style: preserve-3d;
				transform-origin: center center -50px;
				transition: 3s;
			}

			#wrap>.box>div {
				position: absolute;
				width: 100%;
				height: 100%;
				background-color: rgba(220, 78, 65, 1);
				font: 50px/100px "宋体";
				text-align: center;
				backface-visibility: hidden;
				transform-origin: center center -50px;
			}

			#wrap>.box>div:nth-child(5) {
				transform: rotateX(90deg);
			}

			#wrap>.box>div:nth-child(6) {
				transform: rotateX(-90deg);
			}

			#wrap>.box>div:nth-child(3) {
				transform: rotateY(-90deg);
			}

			#wrap>.box>div:nth-child(4) {
				transform: rotateY(90deg);
			}

			#wrap>.box>div:nth-child(2) {
				transform: rotateY(180deg) rotate(180deg);
			}


			#wrap:hover .box {
				transform: rotateX(360deg);
			}
		</style>
	</head>
	<body>
		<div id="wrap">
			<div class="box">
				<div>前</div>
				<div>后</div>
				<div>左</div>
				<div>右</div>
				<div>上</div>
				<div>下</div>
			</div>
		</div>
	</body>
</html>`
